Portable electronic devices, such as smartphones, smartwatches, tablets, wearables and the like are increasingly popular in the marketplace. Such devices perform many functions. In the furtherance of the performing of those functions, such devices may contain a variety of sensors such as accelerometers, gyroscope, barometers, and magnetometers.
Magnetometers may function to detect the magnetic field including the Earth's magnetic field along its axes. In operation, such magnetometers produce a voltage proportional to the strength and polarity of the Earth's magnetic field along the axis with which that magnetometer is directed. From this voltage, the intensity of the magnetic field along that axis may be calculated or estimated.
This magnetic field information may be used for determining the orientation of the electronic device relative to the Earth's magnetic North, for example, or may be used to determine a change in orientation of the electronic device, or other types of information. Since it is desirable to achieve high accuracy in the determination of heading with respect magnetic North, accurate and precise methods of calibrating such magnetometers (which are affected by multiple factors such as hard iron effect, soft iron effect, and magnetic anomalies) are necessary.